<?php
/**
 * Created by PhpStorm.
 * User: dayu
 * Date: 2019/12/19
 * Time: 15:56
 */

namespace app\Validate;


class WxValidate extends RequestValidate
{

    protected function rulesList()
    {
        switch ($this->action) {
            //登录
            case 'index':
                return [
                    'openid' => 'require',
                    'account' => 'require',
                    'password' => 'require'
                ];
            //支付
            case 'JsApiPay':
                return [
                    'type' => "require|require|integer|between:1,3",//1商品购买 2亲友卡
                    'Body' => 'require',
                    'Out_trade_no' => 'require',
                    'Attach' => 'sometimes|require',
                    'Goods_tag' => 'sometimes|require'
                ];




        }
    }

}